<script setup>
import { reactive } from 'vue';
const props = defineProps({
  probeConfig: {
    type: Object
  },
  containerIndex: {
    type: Number
  },
  probeType: {
    type: String
  },
  containerType: {
    type: String
  }
})
const rules = reactive({
  port: [
    { required: true, message: '端口号或服务名必填', trigger: 'blur'}
  ],
})
</script>

<template>
  <el-row :gutter="20">
    <el-col :span="8">
      <el-form-item label="探测端口"
      :prop="('spec.template.spec.containers.'+props.containerIndex+'.'+props.probeType+'.grpc.port')"
      :rules="rules.port"
      required>
        <el-input-number placeholder="端口号或svc名称" :controls="false" :min="1" :max="65535" v-model="props.probeConfig.grpc.port" style="width:150px"></el-input-number>
      </el-form-item>
    </el-col>
    <el-col :span="8">
      <el-form-item label="探测Service" prop="">
        <el-input placeholder="可选 GRPC服务名" v-model="props.probeConfig.grpc.service" style="width:150px"></el-input>
      </el-form-item>
    </el-col>
  </el-row>
</template>

<style scoped>

.titlea{
    margin: 100px;
  }
  .custom-tooltip{
    position: fixed;
    padding: 8px 12px;
    background: rgba(27, 33, 41, .8);
    color: #ffffff;
    border-radius: 5px;
    border: 1px solid rgba(27, 33, 41 .8);
    z-index: 99;
  }
</style>
